package com.bangcommunity.bbframe.sdm.web.exception;

import com.bangcommunity.bbframe.dynconfig.DynConfigClientFactory;
import com.bangcommunity.bbframe.dynconfig.annotation.ZkConf;

/**
 * @Author tanghc
 * @Date 17/11/9
 */
@ZkConf(group = "common", dataId = "dynconfig")
public class RestConf {
    /** 是否为纯rest应用 */
    public static boolean isRest = true;
    /** token在请求中的key值 */
    public static String tokenKey = "token";
    /** username在请求中的key值 */
    public static String uidKey = "username";
    /** 登录成功之后,登录状态保持的时间 */
    public static long appSessionLoginExpireSec = 3600;
    /** 登录过程中生成的缓存信息保存时间 */
    public static long appSessionExpireSec = 600;
    /** shiro缓存的key前置信息 */
    public static String shiroCacheKeyPre = "shiro_redis_session:";
    /** shiro在cookie中种入表示session的唯一标识 */
    public static String sessionIdCookie = "sessionId";
    /***/
    public static RestConf restConf;
    static {
        restConf = DynConfigClientFactory.getClient().proxyConfigBean(RestConf.class);
    }

}
